﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace XFGameFramework
{

    public enum ControllerType 
    {
        /// <summary>
        /// 普通类型
        /// </summary>
        Normal,
        /// <summary>
        /// 不能被移除的类型
        /// </summary>
        CannotRemove
    }
     
    public abstract class Controller
    {

        #region 属性

        public virtual ControllerType Type => ControllerType.Normal;

        /// <summary>
        /// 当前Controller所在的模块
        /// </summary>
        public Module Module { get; internal set; } 

        #endregion

        #region 方法
        /// <summary>
        /// 第一次加载该Controller时触发，仅触发一次
        /// </summary>
        public virtual void OnInit() { }

        /// <summary>
        /// 移除Controller时触发
        /// </summary>
        public virtual void OnExit() { }

        #endregion

    }

}
